feat(lint): warn when composition is missing data-no-timeline#1338
Open
vanceingalls wants to merge 1 commit into
Open
feat(lint): warn when composition is missing data-no-timeline#1338vanceingalls wants to merge 1 commit into
vanceingalls wants to merge 1 commit into
Conversation
0c134a4 to
2bed9b4
Compare
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Adds a
missing_data_no_timelinelint rule to@hyperframes/core's composition linter.Why
The producer polls
window.__timelines[id]for up to 45 seconds waiting for a GSAP timeline to register before starting render. Compositions that never register a timeline (static compositions, pure-CSS animations, etc.) stall every render with a 45-second timeout before the producer gives up and proceeds. The fix is trivially cheap —data-no-timelineon the root element tells the producer to skip the poll entirely — but authors have no signal that they're paying this cost.This rule surfaces the problem at lint time so it can be caught before render.
What changed
packages/core/src/lint/rules/composition.tsmissing_data_no_timelinewarningwhen:data-composition-idrootwindow.__timelines[data-no-timelinefixHintpointing to the exact attribute to addpackages/core/src/lint/rules/composition.test.tsdata-no-timelinepresent, suppressed whenwindow.__timelinesregistration foundTest plan
bun run test packages/core→ all 1559 tests pass including 38 new rule tests